#!/bin/bash
# Copyright (c) 2021 Presto Labs Pte. Ltd.
# Author: fengyang

# build/install env and project

set -e

MINICONDA_PREFIX="${HOME}/miniconda3"
CONDA_ENV_PREFIX="${HOME}/miniconda3/envs/kline_plot_env"

set -e
source "${MINICONDA_PREFIX}/etc/profile.d/conda.sh"
set +e

if [ -d "${CONDA_ENV_PREFIX}" ]; then
  conda activate "${CONDA_ENV_PREFIX}"
else
  bash install_env.sh
  conda activate "${CONDA_ENV_PREFIX}"
fi

bash run.sh
